Open
Conversation
19dc715 to
f05e138
Compare
f05e138 to
648b3d6
Compare
648b3d6 to
cc742f2
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds functionality to update and display the number of completed runs, triggered via the play button.
- Added a new updateCompletedRuns method to the preferences interface and its implementations.
- Updated Battle.kt to call updateCompletedRuns using the current run state and modified the UI in ScriptRunnerUI.kt to display the completed runs count.
- Enhanced PrefsCore.kt to persist the completed runs value and adjusted BattleLauncher.kt to reset it on launch.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/src/main/java/io/github/fate_grand_automata/scripts/prefs/IPreferences.kt | Added updateCompletedRuns with a default parameter. |
| scripts/src/main/java/io/github/fate_grand_automata/scripts/modules/Battle.kt | Calls updateCompletedRuns with the current run count. |
| prefs/src/main/java/io/github/fate_grand_automata/prefs/core/PrefsCore.kt | Introduced persistent storage for completedRuns. |
| prefs/src/main/java/io/github/fate_grand_automata/prefs/Preferences.kt | Implemented the updateCompletedRuns method. |
| app/src/main/java/io/github/fate_grand_automata/ui/runner/ScriptRunnerUI.kt | Displays the completed runs count in the battle UI. |
| app/src/main/java/io/github/fate_grand_automata/ui/launcher/BattleLauncher.kt | Invokes updateCompletedRuns with no argument to reset the count. |
Comments suppressed due to low confidence (1)
app/src/main/java/io/github/fate_grand_automata/ui/launcher/BattleLauncher.kt:146
- Verify that invoking updateCompletedRuns() without an argument—thereby resetting the completed runs count to 0—is intended behavior in this context.
prefs.updateCompletedRuns()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.